load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "cr2pg_lib",
    srcs = ["main.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/cr2pg",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/cmd/cr2pg/sqlstream",
        "//pkg/sql/sem/tree",
        "@com_github_cockroachdb_errors//:errors",
        "@org_golang_x_sync//errgroup",
    ],
)

go_binary(
    name = "cr2pg",
    embed = [":cr2pg_lib"],
    visibility = ["//visibility:public"],
)
